home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
pxewin.zip
/
PXSCROLL.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1992-02-07
|
3KB
|
87 lines
// PXEWIN - (C) Copyright 1992 by Beam Engineering, INC.
// PXSCROLL.HPP //
// Contents ----------------------------------------------------------------
//
// This module contains the class PXScroll for scrolling the database
// with the OWL.
//
// End ---------------------------------------------------------------------
// External Reference Name for this Header ---------------------------------
#ifndef PXSCROLL_HPP
#define PXSCROLL_HPP
// End ---------------------------------------------------------------------
// Interface Dependencies --------------------------------------------------
#ifndef BROWSE_HPP
#include "browse.hpp"
#endif // BROWSE.HPP //
// End ---------------------------------------------------------------------
// class PXScroller //
_CLASSDEF(PXScroller)
class PXScroller:public TScroller
{
private:
virtual const Pchar streamableName() const
{
return "PXScroller";
}
protected:
PDBDISPLAY my_display; /* Copy of database display
routine */
virtual Pvoid read(Ripstream); /* Read persistant object */
virtual void write(Ropstream); /* Write persistant object */
PXScroller(StreamableInit): /* Persistant object
constructor */
TScroller(streamableInit)
{
}
public:
PXScroller(PBrowser TheWindow,
int TheXUnit,int TheYUnit,long TheXRange,long TheYRange):
TScroller((PTWindow)TheWindow,TheXUnit,TheYUnit,
TheXRange,TheYRange)
{
my_display = TheWindow->my_display;
}
static PTStreamable build(); /* Build persistant object */
virtual void VScroll(WORD ScrollEvent, /* Redefine vert. scroll */
int ThumbPos);
};
// Description -------------------------------------------------------------
//
// This class customizes the scroller for operation with the database.
// The horizontal scroller is OK but the vertical scroller needs to
// be modified so that only the data scrolls and not the whole window.
// For persistant objects, The vertical and horizontal scroll positions
// are saved to the stream so that they can be recalled in the next
// session.
//
// End ---------------------------------------------------------------------
// Define inserters and extractors for persistant objects:
inline Ripstream operator >> (Ripstream is,RPXScroller cl)
{return is >> (RTStreamable)cl;}
inline Ripstream operator >> (Ripstream is,RPPXScroller cl)
{return is >> (RPvoid)cl;}
inline Ropstream operator << (Ropstream os,RPXScroller cl)
{return os << (RTStreamable)cl;}
inline Ropstream operator << (Ropstream os,PPXScroller cl)
{return os << (PTStreamable)cl;}
#endif // PXSCROLL_HPP //